#ifndef _FLOORLIVING_TEST_H_
#define _FLOORLIVING_TEST_H_

#include "FloorLiving.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"

/**
 * Test the basic functionality of healing, hurting, setting health,
 * getting health. By default, these should be turned of for floor.
 */
TEST(FloorLiving, healthFunctions)
{
  const int healthOf = 15;
  const int basicDamage = 10;
  FloorLiving l;

  EXPECT_TRUE(0 == l.getHealth());

  l.hurt(basicDamage);

  EXPECT_TRUE(0 == l.getHealth());

  l.heal(healthOf);

  EXPECT_TRUE(0 == l.getHealth());
}

/**
 * Dummy test to satisfy the code coverage, as floor
 * won't have a killCallbackFunction.
 */
void fun_floor_callback(ILiving* ptr)
  {
  }

TEST(FloorLiving, killCallback)
{
  const int baseHealth = 15;
  const int dmg = 45;
  FloorLiving l;

  l.setKillCallback(fun_floor_callback);
  l.hurt(dmg);

  EXPECT_TRUE(0 == l.getHealth());

  /* Call the function, just to fix the code coverage. */
  fun_floor_callback(&l);
}


#endif /* _FLOORLIVING_TEST_H_ */
